ci-automation: enable OCI testing#4143
Conversation
There was a problem hiding this comment.
Pull request overview
Enables OracleCloud Infrastructure (OCI) vendor testing within the CI automation scripts, aiming to promote OCI as an officially supported platform by adding a new vendor test runner, OCI-related environment configuration, and OCI garbage collection.
Changes:
- Added a new OCI vendor test wrapper script (
oraclecloud.sh) that uploads an image viaore oracleand runskolatests against it. - Extended cloud garbage collection to include OCI image cleanup via
ore oracle gc. - Introduced OCI-related CI configuration defaults (image name, subnet, instance types/locations).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ci-automation/vendor-testing/oraclecloud.sh | New OCI vendor test wrapper that uploads an OCI image and runs kola on OCI. |
| ci-automation/garbage_collect_cloud.sh | Adds OCI garbage collection using ore oracle gc. |
| ci-automation/ci-config.env | Adds OCI CI configuration defaults (image name, subnet, instance type/location). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --basename="${kola_test_basename}" \ | ||
| # TODO: Update to oraclecloud | ||
| --platform=oracle \ |
| # TODO: Use actual values for ARM64 | ||
| : ${ORACLECLOUD_arm64_INSTANCE_TYPE:="g1r.4d"} | ||
| : ${ORACLECLOUD_arm64_LOCATION:="YQPA:US-ASHBURN-AD-1"} | ||
| : ${ORACLECLOUD_amd64_LOCATION:="YQPA:US-ASHBURN-AD-1"} |
| source ci-automation/vendor_test.sh | ||
|
|
||
| oraclecloud_instance_type_var="ORACLECLOUD_${CIA_ARCH}_INSTANCE_TYPE" | ||
| oraclecloud_instance_type="${!oraclecloud_instance_type_var}" | ||
|
|
||
| oraclecloud_location_var="ORACLECLOUD_${CIA_ARCH}_LOCATION" | ||
| oraclecloud_location="${!oraclecloud_location_var}" | ||
|
|
| set -x | ||
|
|
||
| timeout --signal=SIGQUIT 2h kola run \ | ||
| --board="${CIA_ARCH}-usr" \ | ||
| --parallel="${ORACLECLOUD_PARALLEL}" \ | ||
| --tapfile="${CIA_TAPFILE}" \ | ||
| --channel="${CIA_CHANNEL}" \ | ||
| --basename="${kola_test_basename}" \ | ||
| --platform=oraclecloud \ | ||
| --oraclecloud-tenancy="${ORACLECLOUD_TENANCY}" \ | ||
| --oraclecloud-user="${ORACLECLOUD_USER}" \ | ||
| --oraclecloud-fingerprint="${ORACLECLOUD_FINGERPRINT}" \ | ||
| --oraclecloud-private-key=<(echo "${ORACLECLOUD_PRIVATE_KEY}" | base64 --decode) \ | ||
| --oraclecloud-image-id="${IMAGE_ID}" \ | ||
| --oraclecloud-shape="${oraclecloud_instance_type}" \ | ||
| --oraclecloud-subnet-id="${ORACLECLOUD_SUBNET_ID}" \ | ||
| --oraclecloud-availability-domain="${oraclecloud_location}" \ | ||
| --oraclecloud-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" \ | ||
| --image-version "${CIA_VERNUM}" \ | ||
| "${@}" | ||
|
|
||
| set +x |
| IMAGE_ID=$(ore oracle \ | ||
| --oracle-config-file="${config_file}" \ | ||
| --oracle-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" \ | ||
| create-image \ | ||
| --board "${CIA_ARCH}-usr" \ | ||
| --name "${kola_test_basename}" \ | ||
| --file="${ORACLECLOUD_IMAGE_NAME}" |
| timeout --signal=SIGQUIT 60m ore oraclecloud gc --duration 6h \ | ||
| --oraclecloud-tenancy="${ORACLECLOUD_TENANCY}" \ | ||
| --oraclecloud-user="${ORACLECLOUD_USER}" \ | ||
| --oraclecloud-fingerprint="${ORACLECLOUD_FINGERPRINT}" \ | ||
| --oraclecloud-private-key=<(echo "${ORACLECLOUD_PRIVATE_KEY}" | base64 --decode) \ | ||
| --oraclecloud-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" |
| # -- OracleCloud -- | ||
| ORACLECLOUD_PARALLEL="${PARALLEL_TESTS:-1}" | ||
| ORACLECLOUD_IMAGE_NAME="flatcar_production_oraclecloud_image.img" | ||
| ORACLECLOUD_SUBNET_ID="ocid1.subnet.oc1.iad.aaaaaaaaafwj2g3ojrn7j2mlk4nnbaq27o4cxelrxstlaymm6ecs76xtb2aa" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
ci-automation/vendor-testing/oraclecloud.sh:41
set -xis enabled beforekola run, and the private key is currently injected via process substitution that expands${ORACLECLOUD_PRIVATE_KEY}inline. With xtrace enabled, bash may emit the expanded secret into logs. Consider decoding the key viasecret_to_filewith xtrace temporarily disabled, then pass the resulting path tokola.
set -x
timeout --signal=SIGQUIT 2h kola run \
--board="${CIA_ARCH}-usr" \
--parallel="${ORACLECLOUD_PARALLEL}" \
ci-automation/ci-config.env:173
ORACLECLOUD_SUBNET_IDis assigned unconditionally, which prevents overriding it via environment variables (unlike most other cloud-specific settings in this file that use: ${VAR:=...}). Making it a default assignment keeps CI working while allowing overrides for other environments/forks.
ORACLECLOUD_SUBNET_ID="ocid1.subnet.oc1.iad.aaaaaaaaafwj2g3ojrn7j2mlk4nnbaq27o4cxelrxstlaymm6ecs76xtb2aa"
| --oraclecloud-fingerprint="${ORACLECLOUD_FINGERPRINT}" \ | ||
| --oraclecloud-private-key-file=<(echo "${ORACLECLOUD_PRIVATE_KEY}" | base64 --decode) \ | ||
| --oraclecloud-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" |
| timeout --signal=SIGQUIT 60m ore oraclecloud gc --duration 6h \ | ||
| --oraclecloud-tenancy="${ORACLECLOUD_TENANCY}" \ | ||
| --oraclecloud-user="${ORACLECLOUD_USER}" \ |
In this commit, we setup oraclecloud testing using SDK and Mantle. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
ci-automation/vendor-testing/oraclecloud.sh:33
oraclecloud_private_key_pathis already created viasecret_to_file, butore oraclecloud create-imagedecodes${ORACLECLOUD_PRIVATE_KEY}again via process substitution. This duplicates secret-handling logic and makes the create-image path inconsistent with the subsequentkola run/GC usage. Reuse the existingoraclecloud_private_key_pathfor theorecall as well.
IMAGE_ID=$(ore oraclecloud \
--oraclecloud-compartment-id="${ORACLECLOUD_COMPARTMENT_ID}" \
--oraclecloud-tenancy="${ORACLECLOUD_TENANCY}" \
--oraclecloud-user="${ORACLECLOUD_USER}" \
--oraclecloud-fingerprint="${ORACLECLOUD_FINGERPRINT}" \
--oraclecloud-private-key-path=<(echo "${ORACLECLOUD_PRIVATE_KEY}" | base64 --decode) \
create-image \
ci-automation/ci-config.env:176
- The default
ORACLECLOUD_arm64_INSTANCE_TYPEis set tog1r.4d, which matches the STACKIT arm64 flavor naming in this same file and does not match the OCI shape naming used for amd64 (e.g.VM.Standard3.Flex). Keeping an obviously non-OCI default here will cause arm64 OracleCloud runs to fail in a confusing way; better to leave it unset until real OCI arm64 values are added so the vendor test fails fast if someone tries to enable arm64 prematurely.
# TODO: Use actual values for ARM64
: ${ORACLECLOUD_arm64_INSTANCE_TYPE:="g1r.4d"}
In this PR, we enable OCI (OracleCloud Infrastructure) testing for Flatcar. Promoting OCI to "officially" supported platform.
Testing done
Tested here: https://jenkins.flatcar.org/job/container/job/test_dispatcher/389/
TODO:
Changelog entries added in the respectivechangelog/directory (user-facing change, bug fix, security fix, update)Inspected CI output for image differences:/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.Needs: